
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: class Resource</title>
</head><body bgcolor="#f0f0f8">
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="Resource">class <strong>Resource</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>A&nbsp;class&nbsp;for&nbsp;interacting&nbsp;with&nbsp;a&nbsp;resource.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Resource-__init__"><strong>__init__</strong></a>(self)</dt></dl>

<dl><dt><a name="Resource-get"><strong>get</strong></a> = method(self, **kwargs)</dt><dd><tt>Returns&nbsp;Analytics&nbsp;data&nbsp;for&nbsp;a&nbsp;profile.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;sort:&nbsp;string,&nbsp;A&nbsp;comma-separated&nbsp;list&nbsp;of&nbsp;dimensions&nbsp;or&nbsp;metrics&nbsp;that&nbsp;determine&nbsp;the&nbsp;sort&nbsp;order&nbsp;for&nbsp;Analytics&nbsp;data.<br>
&nbsp;&nbsp;end_date:&nbsp;string,&nbsp;End&nbsp;date&nbsp;for&nbsp;fetching&nbsp;Analytics&nbsp;data.&nbsp;All&nbsp;requests&nbsp;should&nbsp;specify&nbsp;an&nbsp;end&nbsp;date&nbsp;formatted&nbsp;as&nbsp;YYYY-MM-DD.&nbsp;(required)<br>
&nbsp;&nbsp;dimensions:&nbsp;string,&nbsp;A&nbsp;comma-separated&nbsp;list&nbsp;of&nbsp;Analytics&nbsp;dimensions.&nbsp;E.g.,&nbsp;'ga:browser,ga:city'.<br>
&nbsp;&nbsp;ids:&nbsp;string,&nbsp;Unique&nbsp;table&nbsp;ID&nbsp;for&nbsp;retrieving&nbsp;Analytics&nbsp;data.&nbsp;Table&nbsp;ID&nbsp;is&nbsp;of&nbsp;the&nbsp;form&nbsp;ga:XXXX,&nbsp;where&nbsp;XXXX&nbsp;is&nbsp;the&nbsp;Analytics&nbsp;profile&nbsp;ID.&nbsp;(required)<br>
&nbsp;&nbsp;metrics:&nbsp;string,&nbsp;A&nbsp;comma-separated&nbsp;list&nbsp;of&nbsp;Analytics&nbsp;metrics.&nbsp;E.g.,&nbsp;'ga:visits,ga:pageviews'.&nbsp;At&nbsp;least&nbsp;one&nbsp;metric&nbsp;must&nbsp;be&nbsp;specified.&nbsp;(required)<br>
&nbsp;&nbsp;max_results:&nbsp;integer,&nbsp;The&nbsp;maximum&nbsp;number&nbsp;of&nbsp;entries&nbsp;to&nbsp;include&nbsp;in&nbsp;this&nbsp;feed.<br>
&nbsp;&nbsp;filters:&nbsp;string,&nbsp;A&nbsp;comma-separated&nbsp;list&nbsp;of&nbsp;dimension&nbsp;or&nbsp;metric&nbsp;filters&nbsp;to&nbsp;be&nbsp;applied&nbsp;to&nbsp;Analytics&nbsp;data.<br>
&nbsp;&nbsp;segment:&nbsp;string,&nbsp;An&nbsp;Analytics&nbsp;advanced&nbsp;segment&nbsp;to&nbsp;be&nbsp;applied&nbsp;to&nbsp;data.<br>
&nbsp;&nbsp;start_date:&nbsp;string,&nbsp;Start&nbsp;date&nbsp;for&nbsp;fetching&nbsp;Analytics&nbsp;data.&nbsp;All&nbsp;requests&nbsp;should&nbsp;specify&nbsp;a&nbsp;start&nbsp;date&nbsp;formatted&nbsp;as&nbsp;YYYY-MM-DD.&nbsp;(required)<br>
&nbsp;&nbsp;start_index:&nbsp;integer,&nbsp;An&nbsp;index&nbsp;of&nbsp;the&nbsp;first&nbsp;entity&nbsp;to&nbsp;retrieve.&nbsp;Use&nbsp;this&nbsp;parameter&nbsp;as&nbsp;a&nbsp;pagination&nbsp;mechanism&nbsp;along&nbsp;with&nbsp;the&nbsp;max-results&nbsp;parameter.<br>
&nbsp;<br>
Returns:<br>
&nbsp;&nbsp;An&nbsp;object&nbsp;of&nbsp;the&nbsp;form<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;{<br>
&nbsp;&nbsp;&nbsp;&nbsp;"kind":&nbsp;"analytics#gaData",&nbsp;#&nbsp;Resource&nbsp;type.<br>
&nbsp;&nbsp;&nbsp;&nbsp;"rows":&nbsp;[&nbsp;#&nbsp;Analytics&nbsp;data&nbsp;rows,&nbsp;where&nbsp;each&nbsp;row&nbsp;contains&nbsp;a&nbsp;list&nbsp;of&nbsp;dimension&nbsp;values&nbsp;followed&nbsp;by&nbsp;the&nbsp;metric&nbsp;values.&nbsp;The&nbsp;order&nbsp;of&nbsp;dimensions&nbsp;and&nbsp;metrics&nbsp;is&nbsp;same&nbsp;as&nbsp;specified&nbsp;in&nbsp;the&nbsp;request.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"A&nbsp;String",<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;],<br>
&nbsp;&nbsp;&nbsp;&nbsp;],<br>
&nbsp;&nbsp;&nbsp;&nbsp;"containsSampledData":&nbsp;True&nbsp;or&nbsp;False,&nbsp;#&nbsp;Determines&nbsp;if&nbsp;Analytics&nbsp;data&nbsp;contains&nbsp;samples.<br>
&nbsp;&nbsp;&nbsp;&nbsp;"totalResults":&nbsp;42,&nbsp;#&nbsp;The&nbsp;total&nbsp;number&nbsp;of&nbsp;rows&nbsp;for&nbsp;the&nbsp;query,&nbsp;regardless&nbsp;of&nbsp;the&nbsp;number&nbsp;of&nbsp;rows&nbsp;in&nbsp;the&nbsp;response.<br>
&nbsp;&nbsp;&nbsp;&nbsp;"itemsPerPage":&nbsp;42,&nbsp;#&nbsp;The&nbsp;maximum&nbsp;number&nbsp;of&nbsp;rows&nbsp;the&nbsp;response&nbsp;can&nbsp;contain,&nbsp;regardless&nbsp;of&nbsp;the&nbsp;actual&nbsp;number&nbsp;of&nbsp;rows&nbsp;returned.&nbsp;Its&nbsp;value&nbsp;ranges&nbsp;from&nbsp;1&nbsp;to&nbsp;10,000&nbsp;with&nbsp;a&nbsp;value&nbsp;of&nbsp;1000&nbsp;by&nbsp;default,&nbsp;or&nbsp;otherwise&nbsp;specified&nbsp;by&nbsp;the&nbsp;max-results&nbsp;query&nbsp;parameter.<br>
&nbsp;&nbsp;&nbsp;&nbsp;"totalsForAllResults":&nbsp;{&nbsp;#&nbsp;Total&nbsp;values&nbsp;for&nbsp;the&nbsp;requested&nbsp;metrics&nbsp;over&nbsp;all&nbsp;the&nbsp;results,&nbsp;not&nbsp;just&nbsp;the&nbsp;results&nbsp;returned&nbsp;in&nbsp;this&nbsp;response.&nbsp;The&nbsp;order&nbsp;of&nbsp;the&nbsp;metric&nbsp;totals&nbsp;is&nbsp;same&nbsp;as&nbsp;the&nbsp;metric&nbsp;order&nbsp;specified&nbsp;in&nbsp;the&nbsp;request.<br>
&nbsp;&nbsp;&nbsp;&nbsp;},<br>
&nbsp;&nbsp;&nbsp;&nbsp;"nextLink":&nbsp;"A&nbsp;String",&nbsp;#&nbsp;Link&nbsp;to&nbsp;next&nbsp;page&nbsp;for&nbsp;this&nbsp;Analytics&nbsp;data&nbsp;query.<br>
&nbsp;&nbsp;&nbsp;&nbsp;"id":&nbsp;"A&nbsp;String",&nbsp;#&nbsp;Unique&nbsp;ID&nbsp;for&nbsp;this&nbsp;data&nbsp;response.<br>
&nbsp;&nbsp;&nbsp;&nbsp;"query":&nbsp;{&nbsp;#&nbsp;Analytics&nbsp;data&nbsp;request&nbsp;query&nbsp;parameters.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"max-results":&nbsp;42,&nbsp;#&nbsp;Maximum&nbsp;results&nbsp;per&nbsp;page.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"sort":&nbsp;[&nbsp;#&nbsp;List&nbsp;of&nbsp;dimensions&nbsp;or&nbsp;metrics&nbsp;based&nbsp;on&nbsp;which&nbsp;Analytics&nbsp;data&nbsp;is&nbsp;sorted.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"A&nbsp;String",<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;],<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"dimensions":&nbsp;"A&nbsp;String",&nbsp;#&nbsp;List&nbsp;of&nbsp;analytics&nbsp;dimensions.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"start-date":&nbsp;"A&nbsp;String",&nbsp;#&nbsp;Start&nbsp;date.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"start-index":&nbsp;42,&nbsp;#&nbsp;Start&nbsp;index.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"segment":&nbsp;"A&nbsp;String",&nbsp;#&nbsp;Analytics&nbsp;advanced&nbsp;segment.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"ids":&nbsp;"A&nbsp;String",&nbsp;#&nbsp;Unique&nbsp;table&nbsp;ID.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"metrics":&nbsp;[&nbsp;#&nbsp;List&nbsp;of&nbsp;analytics&nbsp;metrics.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"A&nbsp;String",<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;],<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"filters":&nbsp;"A&nbsp;String",&nbsp;#&nbsp;Comma-separated&nbsp;list&nbsp;of&nbsp;dimension&nbsp;or&nbsp;metric&nbsp;filters.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"end-date":&nbsp;"A&nbsp;String",&nbsp;#&nbsp;End&nbsp;date.<br>
&nbsp;&nbsp;&nbsp;&nbsp;},<br>
&nbsp;&nbsp;&nbsp;&nbsp;"previousLink":&nbsp;"A&nbsp;String",&nbsp;#&nbsp;Link&nbsp;to&nbsp;previous&nbsp;page&nbsp;for&nbsp;this&nbsp;Analytics&nbsp;data&nbsp;query.<br>
&nbsp;&nbsp;&nbsp;&nbsp;"profileInfo":&nbsp;{&nbsp;#&nbsp;Information&nbsp;for&nbsp;the&nbsp;profile,&nbsp;for&nbsp;which&nbsp;the&nbsp;Analytics&nbsp;data&nbsp;was&nbsp;requested.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"webPropertyId":&nbsp;"A&nbsp;String",&nbsp;#&nbsp;Web&nbsp;Property&nbsp;ID&nbsp;to&nbsp;which&nbsp;this&nbsp;profile&nbsp;belongs.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"internalWebPropertyId":&nbsp;"A&nbsp;String",&nbsp;#&nbsp;Internal&nbsp;ID&nbsp;for&nbsp;the&nbsp;web&nbsp;property&nbsp;to&nbsp;which&nbsp;this&nbsp;profile&nbsp;belongs.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"tableId":&nbsp;"A&nbsp;String",&nbsp;#&nbsp;Table&nbsp;ID&nbsp;for&nbsp;profile.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"profileId":&nbsp;"A&nbsp;String",&nbsp;#&nbsp;Profile&nbsp;ID.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"profileName":&nbsp;"A&nbsp;String",&nbsp;#&nbsp;Profile&nbsp;name.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"accountId":&nbsp;"A&nbsp;String",&nbsp;#&nbsp;Account&nbsp;ID&nbsp;to&nbsp;which&nbsp;this&nbsp;profile&nbsp;belongs.<br>
&nbsp;&nbsp;&nbsp;&nbsp;},<br>
&nbsp;&nbsp;&nbsp;&nbsp;"columnHeaders":&nbsp;[&nbsp;#&nbsp;Column&nbsp;headers&nbsp;that&nbsp;list&nbsp;dimension&nbsp;names&nbsp;followed&nbsp;by&nbsp;the&nbsp;metric&nbsp;names.&nbsp;The&nbsp;order&nbsp;of&nbsp;dimensions&nbsp;and&nbsp;metrics&nbsp;is&nbsp;same&nbsp;as&nbsp;specified&nbsp;in&nbsp;the&nbsp;request.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"dataType":&nbsp;"A&nbsp;String",&nbsp;#&nbsp;Data&nbsp;type.&nbsp;Dimension&nbsp;column&nbsp;headers&nbsp;have&nbsp;only&nbsp;STRING&nbsp;as&nbsp;the&nbsp;data&nbsp;type.&nbsp;Metric&nbsp;column&nbsp;headers&nbsp;have&nbsp;data&nbsp;types&nbsp;for&nbsp;metric&nbsp;values&nbsp;such&nbsp;as&nbsp;INTEGER,&nbsp;DOUBLE,&nbsp;CURRENCY&nbsp;etc.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"columnType":&nbsp;"A&nbsp;String",&nbsp;#&nbsp;Column&nbsp;Type.&nbsp;Either&nbsp;DIMENSION&nbsp;or&nbsp;METRIC.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"name":&nbsp;"A&nbsp;String",&nbsp;#&nbsp;Column&nbsp;name.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},<br>
&nbsp;&nbsp;&nbsp;&nbsp;],<br>
&nbsp;&nbsp;&nbsp;&nbsp;"selfLink":&nbsp;"A&nbsp;String",&nbsp;#&nbsp;Link&nbsp;to&nbsp;this&nbsp;page.<br>
&nbsp;&nbsp;}</tt></dd></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table>
</body></html>